//part1:C16:ex16.5.cpp
#include <iostream>
#include <iterator>
#include <string>
using namespace std;
template<typename T, size_t N>
void print1(const T (&a)[N])
{
    for(auto iter = begin(a); iter != end(a); iter++)
    {
        cout << *iter << " ";
    }
    cout << endl;
}

int main(void)
{
    int a[6] = {0, 2, 4, 6, 8, 10};
    string vs[3] = {"Hello", "World", "!"};
    print1(a);
    print1(vs);
    return 0;
}